<?php 
define('_VIEW_MODEL_','admin');
session_start();
$statu = $_SESSION['statu'];
require_once("../init.php");
$act = 'add';
if(!$statu){
	echo "<script>window.parent.location.href='./index.php'</script>";
}
if(isset($action)&&$action == "add"){
	$title = $bbsname;
	$cont  = $bbscont;
	$db->Execute("insert into {$telper}bbs_cont set title = '$title',userid = '1',username = 'admin',content='$cont'");
	header("Location:bbscont.php?act=admin");
}
$smartyObj->assign('title',$admintitle);
$smartyObj->assign('adminbbstitle',$adminbbs);
$smartyObj->assign('act',$act);
$smartyObj->display("adminbbscomt.tpl");
?>